package com.cheng.service.transit.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.cheng.dao.transit.DeliveryinfoDao;
import com.cheng.dao.transit.TransitinfoDao;
import com.cheng.domain.transit.DeliveryInfo;
import com.cheng.domain.transit.TransitInfo;
import com.cheng.service.transit.DeliveryinfoService;

@Service
@Transactional
public class DeliveryinfoServiceImpl implements DeliveryinfoService {

	@Autowired
	private DeliveryinfoDao deliveryinfoDao;
	@Autowired
	private TransitinfoDao transitInfoDao;
	
	@Override
	public void save(DeliveryInfo model, Integer transitinfoid) {
		deliveryinfoDao.save(model);
		TransitInfo transitinfo = transitInfoDao.findOne(transitinfoid);
		transitinfo.setDeliveryInfo(model);
		transitinfo.setStatus("开始配送");
		
	}

}
